<?php

namespace app\api\controller;

use app\api\logic\ArticleLogic;
use app\api\logic\DemandLogic;
use app\common\controller\ApiController;

class Demand extends ApiController
{
    protected array $notNeedLogin = [ 'cate','lists','detail'];

    public function lists()
    {
        return $this->dataLists(new DemandLists());
    }

    public function cate()
    {
        return $this->data(DemandLogic::cate());
    }
    public function detail()
    {
        $id = $this->request->get('id/d');
        $result = DemandLogic::detail($id);
        return $this->data($result);
    }

}